package com.ruoyi.client.domain.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDate;
import java.util.Set;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "watch")
public class MWatch {
    private ObjectId _id;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 对象id（例如文章id）
     */
    private Long targetId;
    /**
     * 日期
     */
    private LocalDate date;
    /**
     * 观看过的id
     */
    private Set<Long> watchedIds;
    /**
     * 观看量
     */
    private Long count;
}
